﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	x:Class="SilverlightApplication.MagnifierControl"
	x:Name="magnifierControl">
    
    <UserControl.Resources>
        <Storyboard x:Name="stbGlassGoBack">
            <DoubleAnimation x:Name="DAXAnimation"
                 Storyboard.TargetName="magnifierControl"
                 Storyboard.TargetProperty="X"
                 Duration="0:0:0.250"
                 />
            <DoubleAnimation x:Name="DAYAnimation"
                 Storyboard.TargetName="magnifierControl"
                 Storyboard.TargetProperty="Y"
                 Duration="0:0:0.250"
                 />
            <DoubleAnimation x:Name="DAAngleAnimation"
                 Storyboard.TargetName="magnifierControl"
                 Storyboard.TargetProperty="Angle"
                 Duration="0:0:0.250"
                 />
        </Storyboard>
    </UserControl.Resources>
    <Grid x:Name="Magnifier" Width="400" Height="300" MouseMove="Magnifier_MouseMove" SizeChanged="Magnifier_SizeChanged">
		<Image Source="logo.png"/>
		<Grid>
			<Grid.Clip>
				<EllipseGeometry x:Name="glass" Center="200,150" RadiusX="50" RadiusY="50"/>
			</Grid.Clip>
			<Grid.RenderTransform>
				<ScaleTransform x:Name="scaleTransform" CenterX="200" CenterY="150" ScaleX="1.5" ScaleY="1.5"/>
			</Grid.RenderTransform>
			<Rectangle x:Name="rctBackground" Margin="-50,-50,-50,-50"/>
			<Image Source="logo.png"/>
		</Grid>
		<!-- Lupa -->
		<Grid>
			<Grid.RenderTransform>
				<TransformGroup>
					<RotateTransform x:Name="glassRT_base" CenterX="200" CenterY="150" Angle="30"/>
                    <RotateTransform x:Name="glassRT" CenterX="200" CenterY="150" />
                    <TranslateTransform x:Name="glassTT_base" X="-200" Y="-150"/>
					<TranslateTransform x:Name="glassTT"/>
				</TransformGroup>
			</Grid.RenderTransform>
			<Ellipse Height="145" Width="145" Fill="White">
				<Ellipse.OpacityMask>
					<RadialGradientBrush>
						<GradientStop Color="#AA000000" Offset="1"/>
						<GradientStop Color="#33000000" Offset="0.6"/>
						<GradientStop Color="#00000000" Offset="0"/>
					</RadialGradientBrush>
				</Ellipse.OpacityMask>
			</Ellipse>
			<Ellipse Height="155" Width="155" Fill="Black" Cursor="Hand" MouseLeftButtonDown="MouseDown" MouseLeftButtonUp="MouseUp">
				<Ellipse.OpacityMask>
					<RadialGradientBrush>
						<GradientStop Color="#FF000000" Offset="1"/>
						<GradientStop Color="#FF000000" Offset="0.9"/>
						<GradientStop Color="#00000000" Offset="0.89"/>
						<GradientStop Color="#00000000" Offset="0"/>
					</RadialGradientBrush>
				</Ellipse.OpacityMask>
			</Ellipse>
			<Rectangle Fill="Black" Width="24" Height="110" Cursor="Hand" MouseLeftButtonDown="MouseDown" MouseLeftButtonUp="MouseUp">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<TranslateTransform Y="125" X="-12"/>
						<SkewTransform AngleX="2"/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Rectangle Fill="Black" Width="24" Height="110" Cursor="Hand" MouseLeftButtonDown="MouseDown" MouseLeftButtonUp="MouseUp">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<TranslateTransform Y="125" X="12"/>
						<SkewTransform AngleX="-2"/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
		</Grid>
		<!-- Lupa -->
        <!--<TextBlock x:Name="tbl" Text="Nada" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>-->
    </Grid>
    
</UserControl>